<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg bgys">
<div class="wrapper wrapper-content animated fadeInRight ibox-content bgystz">
    <form class="form-horizontal m" id="form-abundantWater-edit" th:object="${abundantWater}">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <input id="pointId" name="pointId" th:field="*{pointId}" type="hidden">
        <input id="basicsId" name="basicsId" th:field="*{basicsId}" type="hidden">
        <div class="col-md-3">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>峰段：</label>
                <!--<label class="xh">*</label>-->
                <div class="col-sm-8">
                    <input id="fF" name="fF" th:field="*{fF}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>平段：</label>
                <div class="col-sm-8">
                    <input id="fP" name="fP" th:field="*{fP}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>谷段：</label>
                <div class="col-sm-8">
                    <input id="fG" name="fG" th:field="*{fG}" class="form-control tx" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-3">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="丰水期电量峰段加丰水期电量平段加丰水期电量谷段">小计：</label>
                <div class="col-sm-8">
                    <input id="fTotal" name="fTotal" th:field="*{fTotal}" class="form-control srk" readonly="true"
                           type="number">
                </div>
            </div>
        </div>


        <div class="col-md-12">
            <hr style="height:1px;border:none;border-top:1px solid #555555;"/>

        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>富余电量电厂交易价格：</label>
                <div class="col-sm-8">
                    <input id="factoryPrice" name="factoryPrice" th:field="*{factoryPrice}" class="form-control tx"
                           type="number">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="电厂交易价格乘以富余电量合计">富余电量上网电费：</label>
                <div class="col-sm-8">
                    <input id="upAccount" name="upAccount" th:field="*{upAccount}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>

        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>输配电价：</label>
                <div class="col-sm-8">
                    <input id="sPPrice" name="sPPrice" th:field="*{sPPrice}" class="form-control tx" type="number">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="输配电价乘以交易电量合计">输配收入金额：</label>
                <div class="col-sm-8">
                    <input id="sPAccount" name="sPAccount" th:field="*{sPAccount}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>
        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys"><label class="spty">*</label>基金均价：</label>
                <div class="col-sm-8">
                    <input id="jJAverage" name="jJAverage" th:field="*{jJAverage}" class="form-control tx"
                           type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="基金均价乘以交易电量合计">政府性基金及附加：</label>
                <div class="col-sm-8">
                    <input id="jJAccount" name="jJAccount" th:field="*{jJAccount}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
        </div>

        <div class="col-md-12">
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys">到户均价：</label>
                <div class="col-sm-8">
                    <input id="dHAverage" name="dHAverage" th:field="*{dHAverage}"
                           class="form-control srk" type="number" readonly="true">
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="form-group">
                <label class="col-sm-4 control-label bgys" th:alt-title="到户均价乘以交易电量合计">用户承担电费金额：</label>
                <div class="col-sm-8">
                    <input id="eleAccount" name="eleAccount" th:field="*{eleAccount}" class="form-control srk"
                           readonly="true" type="number">
                </div>
            </div>
        </div>

        <div class="col-md-4">
            <a class="btn btn-success" onclick="submitHandler()">
                <i class="fa fa-hand-peace-o"></i> 计算
            </a>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "service/abundantWater"
    $("#form-abundantWater-edit").validate({
        rules: {
            fF: {
                required: true,
            },
            fP: {
                required: true,
            },
            fG: {
                required: true,
            },
            factoryPrice: {
                required: true,
            },
            sPPrice: {
                required: true,
            },
            jJAverage: {
                required: true,
            },

        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.saveAndRefer(prefix + "/edit", $('#form-abundantWater-edit').serialize());
        }
    }
</script>
</body>
</html>
